package paper.domain;

import java.io.File;
import java.util.UUID;

import javax.persistence.Entity;
import javax.persistence.Transient;

import keter.domain.base.BaseEntity;

import org.apache.commons.lang3.RandomStringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * <p>Class       : paper.domain.Accessory
 * <p>Descdription: 附件
 *
 * @author  gulixing@msn.com
 * @version 1.0.0
 */
@Entity
public class Accessory extends BaseEntity{
	/**
	 * Logger for this class
	 */
	private static final Logger logger = LoggerFactory.getLogger(Accessory.class);
	
	private String fileId = RandomStringUtils.randomAlphabetic(20)+"_"+UUID.randomUUID();
	
	public String getFileId() {
		return fileId;
	}

	public void setFileId(String fileId) {
		this.fileId = fileId;
	}

	//附件名称
	private String name;
	
	//文件存放地址
	private String filePath;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}
	
	
	public File file;

	@Transient
	public File getFile() {
		return file;
	}

	public void setFile(File file) {
		this.file = file;
	}
}
